package com.shundr.auth.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.shundr.auth.R;
import com.shundr.auth.base.BaseActivity;
import com.shundr.auth.common.view.SharedPrefUtil;
import com.shundr.auth.frame.constant.LConstants;
import com.shundr.auth.frame.constant.LContext;
import com.shundr.auth.frame.util.StringUtil;
import com.shundr.auth.frame.util.ToastHelper;
import com.shundr.auth.user.model.UserInfo;

public class SettingActivity extends BaseActivity {
	
	private SharedPrefUtil shPrefUtil;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_qr);
		
		shPrefUtil = new SharedPrefUtil(this, LConstants.PRE_NAME);
		
		findViewById(R.id.ll_change_pwd).setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				if (StringUtil.isNullVal(shPrefUtil.getString(LConstants.STAFF_PHONE, ""))) {
					ToastHelper.toastShort(mContext, "当前用户信息获取失败，请重新登录尝试！");
					return;
				}
				
				Intent intent = new Intent(mContext, ChangePasswordActivity.class);
				mContext.startActivity(intent);
				SettingActivity.this.finish();
			}
		});
	}

}
